package com.cogent.common.util;

import java.sql.Timestamp;

import com.cogent.common.date.JodaDateUtil;

public class SqlDateUtil {
	static {
		System.setProperty("user.timezone","GMT+8");
	}
	
	public static Timestamp toSqlDate(String str) {
		java.util.Date curDate = JodaDateUtil.stringToDate(str);
		
		Timestamp retdate = new Timestamp(curDate.getTime());
		
		return retdate;
	}
	
	public static void main(String[] args) {
		System.out.println(toSqlDate("2009-9-1 12:41:22.11"));
	}

}
